/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/*
 *公用的类。
 */
var isie=(window.ActiveXObject)?true:false;
var  Common={
    //验证码刷新。
    reloadAttr:function(id,attr,url){
        url = url +'?id='+ new Date();
        $("#"+id).attr(attr,url);
    }
}

function Login(){
    
}
/*
 * 重设图片大小
 */
function resetImage(ImgD,FitWidth,FitHeight){
		var image = new Image();
		if(isie){
			image.onload=function(){
				if(image.width>0 && image.height>0){  
					if(image.width>=image.height){
						ImgD.width=FitWidth;
						ImgD.height= (image.height/image.width)*FitHeight; 
					}else{
						ImgD.height=FitHeight;
						ImgD.width= (image.width/image.height)*FitWidth;
					}
					
				}
			};
		}	
		image.src=ImgD.src;	
}
